﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="ListUser.aspx.cs" Inherits="ADC.Web.Admin.ListUser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderData" runat="server">
<div class="admin-header">
        <h2>
            Danh sách người dùng
        </h2>
    <div>
        <div style="padding-top: 20px;">
            <asp:GridView ID="GridViewUser" AutoGenerateColumns="false" runat="server" EnableModelValidation="True"
                HeaderStyle-CssClass="gridview-header" CssClass="gridview" PagerStyle-CssClass="pgr"
                AlternatingRowStyle-CssClass="alt" 
                OnRowEditing="GridViewUser_RowEditing" 
                onrowdeleting="GridViewUser_RowDeleting">
                <Columns>
                    <asp:TemplateField Visible="false">
                        <ItemTemplate>
                            <asp:Label Visible="false" ID="lblUserID" runat="server" Text='<%#Eval("UserID") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên đăng nhập" ItemStyle-CssClass="gridview-item">
                        <ItemTemplate>
                            <label>
                                <%#Eval("UserName")%>
                            </label>
                        </ItemTemplate>
                        <ItemStyle Width="200px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên" ItemStyle-CssClass="gridview-item">
                        <ItemTemplate>
                            <label>
                                <%#Eval("Name")%>
                            </label>
                        </ItemTemplate>
                        <ItemStyle Width="200px" />
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Ngày cập nhật cuối" ItemStyle-CssClass="gridview-item">
                        <ItemTemplate>
                            <label>
                                <%#Eval("ModifiedDate", "{0:dd MMM yyyy hh:ss}")%>
                            </label>
                        </ItemTemplate>
                    </asp:TemplateField>    
                    
                                    
                    <asp:TemplateField>
                    <ItemStyle Width="70px" />
                        <ItemTemplate>

                        <div style="text-align: center">
                                <asp:ImageButton CommandName="Edit" ImageUrl="~/Admin/images/user_edit.png" ID="btnEdit"
                                    runat="server" /> <asp:ImageButton CommandName="Delete" ImageUrl="~/Admin/images/trash.png" ID="btnDelete"
                                    runat="server" OnClientClick="return confirm('Bạn có chắc là muốn xóa người dùng này?');" />
                            </div>
                           

                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>
</asp:Content>
